import request from '@/utils/request'

export const urlPrefix = '/sys/file/'

export function listFiles(query) {
  return request({
    url: urlPrefix,
    method: 'get',
    params: query
  })
}
export function AddFiles(data) {
  return request({
    url: urlPrefix,
    method: 'post',
    data: data
  })
}

export function UpdateFiles(data) {
  return request({
    url: urlPrefix + data.id + '/',
    method: 'put',
    data: data
  })
}

export function delFiles(id) {
  return request({
    url: urlPrefix + id + '/',
    method: 'delete',
  })
}